package com.sanley.piss.mapper;


import com.sanley.piss.model.BaseMapper;
import com.sanley.piss.model.po.BasicInfo;
import com.sanley.piss.model.po.Role;
import com.sanley.piss.model.po.User;
import com.sanley.piss.model.vo.BasicExportVO;
import com.sanley.piss.model.vo.BasicInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 张凯大天才
 */
@Mapper
public interface BasicInfoMapper extends BaseMapper<BasicInfo> {
    /**
     * 查询当前用户添加的所有信息
     * @return
     * @param userId 用户表id
     */
    List<BasicInfoVO> selectAll(@Param("userId") Integer userId);

    /**
     *  查询所有信息
     * @return
     */
    List<BasicInfoVO> selectAllUser();

    /**
     * 根据用户名查询  用于判断用户名是否重复
     * @param jobNum
     * @return
     */
    BasicInfoVO selectJobNum(@Param("jobNum") String jobNum,@Param("name") String name);

    /**
     * 修改部门
     */
    Integer updateOrgByUserId(@Param("orgName") String orgName,@Param("id") Integer id);

    BasicInfoVO selectById(Integer id);

    List<BasicExportVO> selectExport(@Param("ids") Integer[] ids);

    int batchInsert(@Param("list") List<BasicInfo> list);

    void updateSeniority(@Param("id") Integer id);
    /**
     * 查询本部门人员姓名的ID
     */
    Integer selectOrgBasicId(@Param("userId") Integer userId,@Param("name") String name);


}